Assembling/splitting of BOOL/BYTE/WORD/DWORD

 

EcoStruxure Machine Expert - Safety provides function blocks with assembling/splitting functionality.

Why assembling/splitting signals?

To improve the clarity of the safety logic and to process signals as a bundle, assembly function blocks are available to combine (summarize) individual binary signals (BOOLean variables) to groups of 8, 16 or 32 bits and handle them as BYTE, WORD or DWORD data type respec­tively.

After summarizing the individual bits, bitwise access is only possible after using a splitting function block which separates a BYTE, WORD or DWORD into individual bits (BOOL) again.

Available assembly FBs:

Available splitting FBs:

Assemble: SAFEBITS_TO_SAFEBYTE / BITS_TO_BYTE

This function block summarizes eight (SAFE)BOOL input variables to one (SAFE)BYTE output variable.

Bit valence: In the output Byte, the bit read at IN_0 is inserted as least significant bit (lsb) as shown below. IN_7 is considered as most signifi­cant bit (msb).

NOTE:

The same bit allocation applies to the standard FB BITS_TO_­BYTE (displayed as gray block symbol).

MUX_SAFEBITS2SAFEBYTE.gif

Top of page (overview on assembly/splitting FBs)

Assemble: SAFEBITS_TO_SAFEWORD / BITS_TO_WORD

This function block summarizes 16 (SAFE)BOOL input variables to one (SAFE)WORD output variable.

Bit valence: In the output Word, the bit read at IN_0 is inserted as least significant bit (lsb) as shown below. IN_15 is considered as most signif­icant bit (msb).

NOTE:

The same bit allocation applies to the standard FB BITS_TO_WORD (displayed as gray block symbol).

MUX_SAFEBITS2SAFEWORD.gif

Top of page (overview on assembly/splitting FBs)

Assemble: SAFEBYTES_TO_SAFEWORD / BYTES_TO_WORD

This function block summarizes two (SAFE)BYTE input variables to one (SAFE)WORD output variable.

Byte valence: In the output Word, the Byte read at IN_0 is inserted as least significant Byte (LSB) as shown below. IN_1 is considered as most significant Byte (MSB).

NOTE:

The same Byte allocation applies to the standard BYTES_TO_WORD FB (displayed as gray block symbol).

MUX_SAFEBYTES2SAFEWORD.gif

Top of page (overview on assembly/splitting FBs)

Assemble: SAFEWORDS_TO_SAFEDWORD / WORDS_TO_D­WORD

This function block summarizes two (SAFE)WORD input variables to one (SAFE)DWORD output variable.

Word valence: In the output DWord, the Word read at IN_0 is inserted as least significant Word (LSW). IN_1 is inserted as most significant Word (MSW).

NOTE:

The same Word allocation applies to the standard FB WORDS_TO_DWORD (displayed as gray block symbol).

MUX_SAFEWORDS2SAFEDWORD.gif

Top of page (overview on assembly/splitting FBs)

Split: SAFEBYTE_TO_SAFEBITS / BYTE_TO_BITS

This function block splits one (SAFE)BYTE input variable to eight (SAFE)BOOL output variables.

Bit valence: The least significant bit (lsb), i.e., bit 0 of the input Byte, is applied to output OUT_0. The most significant bit (msb) of the input Byte is output at OUT_7.

NOTE:

The same bit allocation applies to the standard BYTE_TO_BITS FB (displayed as gray block symbol).

DeMUX_SAFEBYTE2SAFEBITS.gif

Top of page (overview on assembly/splitting FBs)

Split: SAFEWORD_TO_SAFEBITS / WORD_TO_BITS

This function block splits one (SAFE)WORD input variable to 16 (SAFE)BOOL output variables.

Bit valence: The least significant bit (lsb), i.e., bit 0 of the input Word, is applied to output OUT_0. The most significant bit (msb) of the input Word is output at OUT_15.

NOTE:

The same bit allocation applies to the standard FB WORD_TO_BITS (displayed as gray block symbol).

DeMUX_SAFEWORD2SAFEBITs.gif

Top of page (overview on assembly/splitting FBs)

Split: SAFEWORD_TO_SAFEBYTES / WORD_TO_BYTES

This function block splits one (SAFE)WORD input variable to two (SAFE)BYTE output variables.

Bit valence: Bits 0 to 7 of the input Word are output as Byte variable at OUT_0. Bits 8 to 15 of the input Word are output as Byte variable at OUT_1.

NOTE:

The same bit allocation applies to the standard FB WORD_TO_­BYTES (displayed as gray block symbol).

DeMUX_SAFEWORD2SAFEBYTES.gif

Top of page (overview on assembly/splitting FBs)

Split: SAFEDWORD_TO_SAFEWORDS / DWORD_TO_WORDS

This function block splits one (SAFE)DWORD input variable to two (SAFE)WORD output variables.

Bit valence: Bits 0 to 15 of the input DWord are output as Word variable at OUT_0. Bits 16 to 31 of the input DWord are output as Word variable at OUT_1.

NOTE:

The same bit allocation applies to the standard DWORD_TO_WORDS FB (displayed as gray block symbol).

DeMUX_SAFEDWORD2SAFEWORDS.gif

Top of page (overview on assembly/splitting FBs)